<!DOCTYPE html>
<head>
  <title>_load_func</title>
  <meta charset="utf-8">

  <link type="text/css" rel="stylesheet" href="../highlight/styles/common.css">
  <link rel="alternate stylesheet" title="Zenburn" href="../highlight/styles/zenburn.css">
  <link rel="alternate stylesheet" title="Pojoaque" href="../highlight/styles/pojoaque.css">
  <link rel="alternate stylesheet" title="MonoBlue" href="../highlight/styles/mono-blue.css">
  <script src="../highlight/styleswitcher.js" type="text/javascript"></script>
  
<body>

<div id="styleswitcher"></div>

<table id="autotest">
  <tr>
    <td class="php">
<pre><code>
	/**
	 * 加载函数库
	 * @param string $func 函数库名
	 * @param string $path 地址
	 */
	private static function _load_func($func, $path = '') {
		static $funcs = array();
		if (empty($path)) $path = 'libs'.DIRECTORY_SEPARATOR.'functions';
		$path .= DIRECTORY_SEPARATOR.$func.'.func.php';
		$key = md5($path);
		if (isset($funcs[$key])) return true;
		if (file_exists(PC_PATH.$path)) {
			include PC_PATH.$path;
		} else {
			$funcs[$key] = false;
			return false;
		}
		$funcs[$key] = true;
		return true;
	}
</code></pre>
    </td>
  </tr>
</table>
